//
//  AppDelegate.m
//  QWView
//
//  Created by 李奇伟 on 15/3/28.
//  Copyright (c) 2015年 李奇伟. All rights reserved.
//

#import "UITextField+Additional.h"

@implementation UITextField (Additional)
//设置圆角的
- (instancetype)initWithFrame:(CGRect)frame placeholder:(NSString *)placeholder isSecure:(BOOL)isSecure
{
    return [self initWithFrame:frame placeholder:placeholder isSecure:isSecure keyboardType:UIKeyboardTypeDefault];
}

- (instancetype)initWithFrame:(CGRect)frame placeholder:(NSString *)placeholder isSecure:(BOOL)isSecure keyboardType:(UIKeyboardType)keyboardType
{
    self = [self initWithFrame:frame];
    if (self) {
        self.text = @"";
        
        self.autocorrectionType = UITextAutocorrectionTypeNo;
        self.autocapitalizationType = UITextAutocapitalizationTypeNone;
        self.placeholder = placeholder;
        self.secureTextEntry = isSecure;
        self.borderStyle = UITextBorderStyleRoundedRect;
        self.keyboardType = keyboardType;
    }
    return self;
}

@end
